#coding: utf-8


from MySQLdb import connect,IntegrityError
conn=connect(user='fang3',passwd='123456',db='test',host='localhost')
cursor=conn.cursor()
cursor.execute('set names utf8')
cursor.execute('set character set utf8')
cursor.execute('insert into test2 set name=%s','测试')